<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
   <button v-on:click="sayHi">点我</button>
    <button @click="sayHi">dianwo</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js">

</script>
<script>
    var vm = new Vue({
        el: "#app",
       data:{
            message:"Hello World"
       },
        methods:{
            sayHi:function (event){
                alert(this.message);
            }
        }
    });
</script>
</body>
</html>